
#include "Enabling.hpp"

namespace zen {

	namespace video {

		bool Enabled::enabled[Enabled::SIZE];
		bool Enabled::initialized = Enabled::initialize();

		bool Enabled::initialize() {
			enabled[ALPHA_TEST] = false;
			enabled[AUTO_NORMAL] = false;
			enabled[BLEND] = glIsEnabled(GL_BLEND) == GL_TRUE;
			enabled[CLIP_PLANE] = false;
			enabled[COLOR_LOGIC_OPERATION] = glIsEnabled(GL_COLOR_LOGIC_OP) == GL_TRUE;
			enabled[COLOR_MATERIAL] = false;
			enabled[CULL_FACE] = glIsEnabled(GL_CULL_FACE) == GL_TRUE;
			enabled[DEPTH_TEST] = glIsEnabled(GL_DEPTH_TEST) == GL_TRUE;
			enabled[DITHER] = glIsEnabled(GL_DITHER) == GL_TRUE;
			enabled[FOG] = false;
			enabled[INDEX_LOGIC_OPERATION] = false;
			enabled[LINE_STIPPLE] = false;
			enabled[NORMALIZE] = false;
			enabled[POINT_SMOOTH] = glIsEnabled(GL_POINT_SMOOTH) == GL_TRUE;
			enabled[LINE_SMOOTH] = glIsEnabled(GL_LINE_SMOOTH) == GL_TRUE;
			enabled[POLYGON_SMOOTH] = glIsEnabled(GL_POLYGON_SMOOTH) == GL_TRUE;
			enabled[SCISSOR_TEST] = glIsEnabled(GL_SCISSOR_TEST) == GL_TRUE;
			enabled[STENCIL_TEST] = glIsEnabled(GL_STENCIL_TEST) == GL_TRUE;
			enabled[TEXTURE1D] = false;
			enabled[TEXTURE2D] = false;
			enabled[TEXTURE3D] = false;
			enabled[WIREFRAME] = false;
			return true;
		}

	} // namespace video

} // namespace zen
